/*XXXX:Just use array to realise function. Use real list please*/
#include "list.h"

#define MAX_LENTH 1024

int list_nodes[MAX_LENTH];
int cursor = 0;

void init_list()
{
    
}

int add_tail(int value)
{
    if(cursor >= MAX_LENTH-1){
        return -1;
    }else{
        list_nodes[cursor++] = value;
        return 0;
    }
}

int get_del_tail()
{
	if((cursor - 1) >= 0){		
		cursor--;
    	return list_nodes[cursor];
	}else{		
		return -1;
	}
}

int is_empty()
{
	if(cursor == 0)
		return 1;
	else
		return 0;
}